package com.xuecheng.learning.convert;

import com.xuecheng.api.learning.model.dto.CourseRecordDTO;
import com.xuecheng.learning.entity.CourseRecord;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CourseRecordConvert {

    CourseRecordConvert INSTANCE = Mappers.getMapper(CourseRecordConvert.class);

    //po-->dto
    @Mapping(source = "id", target = "courseRecordId")
    CourseRecordDTO entity2dto(CourseRecord po);


    List<CourseRecordDTO> entitys2dtos(List<CourseRecord> pos);
}
